home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Prograph Classic 2.6.1 / Prograph Reference Manual / Prograph Reference 5-7 / Prograph Reference 5-7.rsrc / TEXT_152.txt < prev    next >
Encoding:
Text File  |  1995-10-25  |  6.9 KB  |  415 lines

  1.  Chapter 6
  2.  
  3.  Prograph Primitives
  4.  
  5.  t Prograph Primitives by Category  *245*
  6.  t Prograph Primitives Descriptions
  7.  
  8. Prograph primitives are calls to compiled methods, supplied either by the system or by the user. The user can create custom primitives, which are treated by Prograph in exactly the same way as its own primitives. appendix II, ‚ÄúC Code Usage,‚Äù documents how this is done using a C compiler.
  9.  
  10.  
  11. t    Prograph Primitives by Category  *245*
  12.  
  13. AppleTalk
  14.  
  15. ATP-Close    251
  16. ATP-Get-Request    252
  17. ATP-Get-Response    252
  18. ATP-Open    252
  19. ATP-Send-Request    253
  20. ATP-Send-Response    253
  21. NBP-Close    254
  22. NBP-Confirm    254
  23. NBP-Lookup    254
  24. NBP-Open    255
  25. NBP-Register    255
  26.  
  27. Application 
  28.  
  29. draw-style-text    256
  30. find-item    256
  31. find-menu    257
  32. find-menu-a    257
  33. find-window    258
  34. find-window-a    258
  35. is-double?    258
  36. is-drag?    259
  37. popup-menu    259
  38. wait-double?    259
  39.  
  40. Bit
  41.  
  42. bit-and    260
  43. bit-not    260
  44. bit-or    260
  45. bit-shift-l    261
  46. bit-shift-r    261
  47. bit-xor    261
  48. test-all?    262
  49. test-bit?    262
  50. test-one?    262
  51.  
  52. Byte Stream
  53.  
  54. clear-bytes-map    263
  55. from-bytes    264
  56. to-bytes    264
  57.  
  58. Data
  59.  
  60. choose    265
  61. copy    265
  62. switch    265
  63. shallow-copy    266
  64.  
  65. Datafile 
  66.  
  67. cluster-delete    494
  68. cluster-first    495
  69. cluster-lock    495
  70. cluster-next    496
  71. cluster-read    496
  72. cluster-read-db    496
  73. cluster-replace    497
  74. cluster-undelete    497
  75. cluster-unlock    498
  76. cluster-write    498
  77. db-backup    499
  78. db-close    500
  79. db-compact    500
  80. db-delete    501
  81. db-flush    501
  82. db-get-flush    501
  83. db-info    502
  84. db-list    502
  85. db-new    503
  86. db-open    504
  87. db-rename    504
  88. db-set-flush    505
  89. db-shutdown    505
  90. db-wait    505
  91. key-close    505
  92. key-delete    506
  93. key-find    506
  94. key-first    506
  95. key-info    507
  96. key-last    507
  97. key-list    507
  98. key-new    508
  99. key-next    508
  100. key-open    509
  101. key-previous    509
  102. key-read    510
  103. key-rename    510
  104. key-value    511
  105. table-close    511
  106. table-delete    512
  107. table-export    512
  108. table-import    513
  109. table-info    514
  110. table-list    514
  111. table-new    515
  112. table-open    515
  113. table-rename    516
  114.  
  115. Environment
  116.  
  117. gestalt    267
  118. gestalt-attribute    268
  119. trap?    268
  120.  
  121. File
  122.  
  123. close    269
  124. create    269
  125. delete    270
  126. file-size    270
  127. get-file    270
  128. get-position    271
  129. load    271
  130. open    272
  131. prograph-file    272
  132. put-file    272
  133. read    273
  134. read-line    273
  135. rename    274
  136. save    274
  137. set-position    275
  138. write    275
  139. write-line    275
  140.  
  141. Graphics
  142.  
  143. drag-rect    276
  144. find-bounds    276
  145. grow-rect    277
  146. ints-to-point    277
  147. ints-to-rect    278
  148. ints-to-rgb    278
  149. point-to-ints    278
  150. points-to-rect    279
  151. rect-to-ints    279
  152. rect-to-points    280
  153. rgb-to-ints    280
  154.  
  155. Instances
  156.  
  157. find-instance    281
  158. inst-to-list    281
  159. list-to-inst    282
  160.  
  161. Interpretercontrol
  162.  
  163. compiled?    283
  164. debug    283
  165. halt    283
  166. trace    283
  167.  
  168. I/O
  169.  
  170. accept    284
  171. answer    284
  172. answer-v    285
  173. ask    285
  174. display    286
  175. print-window    286
  176. select    286
  177. set-dialog-font    287
  178. show    287
  179.  
  180. Lists
  181.  
  182. (in)    288
  183. (join)    288
  184. (length)    288
  185. attach-l    289
  186. attach-r    289
  187. detach-l    289
  188. detach-nth    290
  189. detach-r    290
  190. find-sorted    290
  191. get-nth    291
  192. insert-nth    291
  193. make-list    292
  194. pack    292
  195. reverse    292
  196. set-nth    293
  197. set-nth!    293
  198. sort    293
  199. split-nth    294
  200. unpack    294
  201.  
  202. Logical/Relational
  203.  
  204. <    295
  205. <=    295
  206. =    295
  207. >    296
  208. >=    296
  209. and    297
  210. not    297
  211. or    297
  212. xor    298
  213. ~=    298
  214. ‚↠   298
  215. ‚â§    299
  216. ‚â•    299
  217.  
  218. Math
  219.  
  220. *    300
  221. **    300
  222. +    301
  223. ++    301
  224. +1    301
  225. -    302
  226. - -    302
  227. -1    302
  228. abs    303
  229. acos    303
  230. annuity    303
  231. asin    304
  232. atan    304
  233. atan2    304
  234. compound    305
  235. cos    305
  236. div    305
  237. exp    306
  238. idiv    306
  239. ln    306
  240. log10    307
  241. max    307
  242. min    307
  243. pi    308
  244. power    308
  245. rand    308
  246. round    308
  247. round-down    309
  248. round-up    309
  249. set-seed    310
  250. sign    310
  251. sign-extend    310
  252. sin    311
  253. sqrt    311
  254. tan    311
  255. trunc    311
  256. √∑    312
  257. √∑√∑    312
  258.  
  259. Memory
  260.  
  261. address-to-object    313
  262. block-address    313
  263. block-size    314
  264. compact-memory    314
  265. from-handle    314
  266. from-pointer    314
  267. get-integer    315
  268. get-point    315
  269. get-real    315
  270. get-rect    316
  271. get-string    316
  272. get-text    316
  273. lock-block    317
  274. lock-string    317
  275. make-direct    317
  276. make-handle    317
  277. make-pointer    318
  278. new-block    318
  279. object-to-address    319
  280. put-integer    319
  281. put-point    319
  282. put-real    320
  283. put-rect    320
  284. put-string    320
  285. put-text    321
  286. string-address    321
  287. to-handle    321
  288. to-pointer    322
  289. unlock-block    322
  290. unlock-string    322
  291.  
  292. Serial Port
  293.  
  294. break-serial-port    324
  295. close-serial-port    324
  296. configure-sport    325
  297. count-sport-input    325
  298. get-sport-buffer    326
  299. get-sport-refs    326
  300. kill-serial-port    326
  301. open-serial-port    327
  302. receive-serial-port    327
  303. send-serial-port    327
  304. send-sport-done    328
  305. set-sport-buffer    328
  306. sport-configuration    329
  307.  
  308. Strings
  309.  
  310. "in"    330
  311. "join"    330
  312. "length"    331
  313. byte-length    331
  314. format    331
  315. from-ascii    334
  316. from-string    334
  317. integer-to-string    335
  318. middle    335
  319. munge-string    335
  320. prefix    335
  321. string-length    336
  322. string-to-integer    336
  323. suffix    337
  324. to-ascii    337
  325. to-string    337
  326. tokenize    338
  327.  
  328. System
  329.  
  330. ancestors    339
  331. attr-com    339
  332. attributes    340
  333. called-from-get    340
  334. called-from-meth    340
  335. called-from-set    341
  336. calls-to-get    341
  337. calls-to-meth    342
  338. calls-to-set    342
  339. children    342
  340. class-com    343
  341. classes    343
  342. descendants    343
  343. meth-com    343
  344. meth-com-g    344
  345. meth-com-s    344
  346. methods    344
  347. pers-com    345
  348. persistents    345
  349. settable    345
  350.  
  351. System Class 
  352.  
  353. sc-activate-wind    346
  354. sc-aevent-begin    346
  355. sc-aevent-dispatch    347
  356. sc-aevent-end    347
  357. sc-background?    348
  358. sc-begin-drawing    348
  359. sc-begin-update    348
  360. sc-click-witem    349
  361. sc-delete-item    349
  362. sc-draw-witem    350
  363. sc-end-drawing    350
  364. sc-end-update    350
  365. sc-find-witem    351
  366. sc-get-wind    351
  367. sc-hilite-witem    351
  368. sc-idle-edit    352
  369. sc-insert-item    352
  370. sc-key-button    352
  371. sc-key-edit    353
  372. sc-key-list    353
  373. sc-key-menu    354
  374. sc-show-balloon    354
  375. sc-tab-witem    354
  376. sc-zoom-wind    355
  377.  
  378. Text
  379.  
  380. auto-text    356
  381. clear-text    356
  382. copy-text    356
  383. cut-text    357
  384. extract-text    357
  385. insert-text    357
  386. paste-text    357
  387. print-text    358
  388.  
  389. Type
  390.  
  391. boolean?    359
  392. external-type    359
  393. instance?    359
  394. integer?    360
  395. list?    360
  396. mac-type    360
  397. number?    361
  398. real?    361
  399. string?    361
  400. type    362
  401.  
  402. t    Prograph Primitives Descriptions *248*
  403.  
  404. Certain supplied primitives perform tests or manipulate boolean input values to obtain a boolean result. Every such boolean primitive can either have one root, in which case it returns TRUE or FALSE, or no roots, in which case it succeeds or fails. If a boolean primitive is used without a root, it should have an associated control so that possible failure of the operation does not result in an execution error. 
  405.  
  406. The boolean primitives are those in the category Logical/Relational, or those whose names end with a question mark (?).
  407.  
  408. Some primitives accept an input (or produce an output) of more than one type. In the descriptions of primitives below, such an input (or output) is given a set of identifiers corresponding to the set of possible types. For example, see below the primitive find-item, the second input of which is given the two identifiers ItemName and ItemIndex, corresponding to the two acceptable types string and integer.  *249*
  409.  
  410. When an input or output is optional, its corresponding type is given within square brackets ( [ ] ).  For example, in the Application category, see the primitive is-drag?, the output of which is optional and so is indicated in output types as [boolean]. 
  411.  
  412. Certain primitives have a list and one or more integers as input, where the integers are indeces into the list or the list of lists. If such a primitive receives an integer less than 1 or greater than the length of the list it accesses, an execution error occurs.
  413.  
  414. In order to support internationalization and non-Roman scripts, aliases have been created for those primitives with names made up of characters with ASCII values greater than 127. These primitives are ‚â§, ‚â•, ‚â†, √∑, and √∑√∑. Their aliases are <=, >=, ~=, div, and idiv, respectively.
  415.